<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ShipCAD: ShipCADlib/shader.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ShipCAD
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_f0b6ef187c5b1483641b038f81654ac4.html">ShipCADlib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">shader.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="shader_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*##############################################################################################</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *    ShipCAD                                                                                  *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *    Copyright 2015, by Greg Green &lt;ggreen@bit-builder.com&gt;                                   *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *    Original Copyright header below                                                          *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *    This code is distributed as part of the FREE!ship project. FREE!ship is an               *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *    open source surface-modelling program based on subdivision surfaces and intended for     *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *    designing ships.                                                                         *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *    Copyright © 2005, by Martijn van Engeland                                                *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *    e-mail                  : Info@FREEship.org                                              *</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *    FREE!ship project page  : https://sourceforge.net/projects/freeship                      *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *    FREE!ship homepage      : www.FREEship.org                                               *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *    This program is free software; you can redistribute it and/or modify it under            *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *    the terms of the GNU General Public License as published by the                          *</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *    Free Software Foundation; either version 2 of the License, or (at your option)           *</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *    any later version.                                                                       *</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *    This program is distributed in the hope that it will be useful, but WITHOUT ANY          *</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A          *</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *    PARTICULAR PURPOSE. See the GNU General Public License for more details.                 *</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *    You should have received a copy of the GNU General Public License along with             *</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *    this program; if not, write to the Free Software Foundation, Inc.,                       *</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *    59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                                    *</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *#############################################################################################*/</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#ifndef SHADER_H</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#define SHADER_H</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;QtCore&gt;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;QtGui&gt;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceShipCAD.html">ShipCAD</a> {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">class </span>Viewport;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Shader.html">   45</a></span>&#160;<span class="keyword">class </span><a class="code" href="classShipCAD_1_1Shader.html">Shader</a> : <span class="keyword">public</span> QObject</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;{</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    Q_OBJECT</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classShipCAD_1_1Shader.html#a36bc24054e22fb965b04dae9a2b76eb7">Shader</a>(<a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* vp);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classShipCAD_1_1Shader.html#aff01df87e8a102f270b5b135a295e59d">~Shader</a>();</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Shader.html#a011fae279e362f548e8c4e4b35b7291e">initialize</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* vertexShaderSource,</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">char</span>* fragmentShaderSource,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;            std::vector&lt;std::string&gt; uniforms,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;            std::vector&lt;std::string&gt; attributes);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Shader.html#ac8faec958f9d5806510d39be5f512c8e">addUniform</a>(<span class="keyword">const</span> std::string&amp; name);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Shader.html#a6a298be357d7860d859aedbe397b81b9">addAttribute</a>(<span class="keyword">const</span> std::string&amp; name);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">   62</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">bind</a>() {<a class="code" href="classShipCAD_1_1Shader.html#a3967404471db3284a2448c4a39b8c230">_program</a>-&gt;bind();}</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">   63</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">release</a>() {<a class="code" href="classShipCAD_1_1Shader.html#a3967404471db3284a2448c4a39b8c230">_program</a>-&gt;release();}</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Shader.html#a0ee19c28f4fd4260b70095ccd433d546">   67</a></span>&#160;    <a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* <a class="code" href="classShipCAD_1_1Shader.html#a0ee19c28f4fd4260b70095ccd433d546">_viewport</a>;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Shader.html#a3967404471db3284a2448c4a39b8c230">   68</a></span>&#160;    QOpenGLShaderProgram *<a class="code" href="classShipCAD_1_1Shader.html#a3967404471db3284a2448c4a39b8c230">_program</a>;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Shader.html#a5c98e4ae6e3403f179a3fcf204b34baf">   69</a></span>&#160;    std::map&lt;std::string, GLuint&gt; <a class="code" href="classShipCAD_1_1Shader.html#a5c98e4ae6e3403f179a3fcf204b34baf">_uniforms</a>;</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classShipCAD_1_1Shader.html#af2f710f7b4d792fea09ddd11ab0cdf25">   70</a></span>&#160;    std::map&lt;std::string, GLuint&gt; <a class="code" href="classShipCAD_1_1Shader.html#af2f710f7b4d792fea09ddd11ab0cdf25">_attributes</a>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;};</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classShipCAD_1_1LineShader.html">   75</a></span>&#160;<span class="keyword">class </span><a class="code" href="classShipCAD_1_1LineShader.html">LineShader</a> : <span class="keyword">public</span> <a class="code" href="classShipCAD_1_1Shader.html">Shader</a></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;{</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    Q_OBJECT</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classShipCAD_1_1LineShader.html">LineShader</a>(<a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* vp);</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classShipCAD_1_1LineShader.html#ae5c2761813aac4839a5b31648e37d343">   82</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classShipCAD_1_1LineShader.html#ae5c2761813aac4839a5b31648e37d343">~LineShader</a>() {}</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordtype">void</span> setMatrix(<span class="keyword">const</span> QMatrix4x4&amp; matrix);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordtype">void</span> renderPoints(QVector&lt;QVector3D&gt;&amp; points, QColor color);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordtype">void</span> renderLines(QVector&lt;QVector3D&gt;&amp; vertices, QColor lineColor);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    QVector&lt;QVector3D&gt;&amp; getVertexBuffer();</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    QVector&lt;QVector3D&gt; _vertices;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;};</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classShipCAD_1_1FaceShader.html">   97</a></span>&#160;<span class="keyword">class </span><a class="code" href="classShipCAD_1_1FaceShader.html">FaceShader</a> : <span class="keyword">public</span> <a class="code" href="classShipCAD_1_1Shader.html">Shader</a></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;{</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    Q_OBJECT</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classShipCAD_1_1FaceShader.html#a67bd0296f829456035a829b95f1befb7">  103</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classShipCAD_1_1FaceShader.html#a67bd0296f829456035a829b95f1befb7">FaceShader</a>(<a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* vp)</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        : <a class="code" href="classShipCAD_1_1Shader.html">Shader</a>(vp) {}</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classShipCAD_1_1FaceShader.html#afbd21e69afb094aea484144be9ac1fbd">  105</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classShipCAD_1_1FaceShader.html#afbd21e69afb094aea484144be9ac1fbd">~FaceShader</a>() {}</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> renderMesh(QColor meshColor,</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                            QVector&lt;QVector3D&gt;&amp; vertices,</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                            QVector&lt;QVector3D&gt;&amp; normals) = 0;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;};</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classShipCAD_1_1MonoFaceShader.html">  114</a></span>&#160;<span class="keyword">class </span><a class="code" href="classShipCAD_1_1MonoFaceShader.html">MonoFaceShader</a> : <span class="keyword">public</span> <a class="code" href="classShipCAD_1_1FaceShader.html">FaceShader</a></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;{</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    Q_OBJECT</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classShipCAD_1_1MonoFaceShader.html">MonoFaceShader</a>(<a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* vp);</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classShipCAD_1_1MonoFaceShader.html#ab1f3cb853a5a2b04f9c4944d9eca30b4">  121</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classShipCAD_1_1MonoFaceShader.html#ab1f3cb853a5a2b04f9c4944d9eca30b4">~MonoFaceShader</a>() {}</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordtype">void</span> setMatrix(<span class="keyword">const</span> QMatrix4x4&amp; matrix);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> renderMesh(QColor meshColor,</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                            QVector&lt;QVector3D&gt;&amp; vertices,</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                            QVector&lt;QVector3D&gt;&amp; normals);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;};</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classShipCAD_1_1LightedFaceShader.html">  133</a></span>&#160;<span class="keyword">class </span><a class="code" href="classShipCAD_1_1LightedFaceShader.html">LightedFaceShader</a> : <span class="keyword">public</span> <a class="code" href="classShipCAD_1_1FaceShader.html">FaceShader</a></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;{</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    Q_OBJECT</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classShipCAD_1_1LightedFaceShader.html">LightedFaceShader</a>(<a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* vp);</div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="classShipCAD_1_1LightedFaceShader.html#a6ce7e752639fd1c8dd12b721279ac814">  140</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classShipCAD_1_1LightedFaceShader.html#a6ce7e752639fd1c8dd12b721279ac814">~LightedFaceShader</a>() {}</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keywordtype">void</span> setMatrices(<span class="keyword">const</span> QMatrix4x4&amp; proj, <span class="keyword">const</span> QMatrix4x4&amp; view, <span class="keyword">const</span> QMatrix4x4&amp; world);</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> renderMesh(QColor meshColor,</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                            QVector&lt;QVector3D&gt;&amp; vertices,</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                            QVector&lt;QVector3D&gt;&amp; normals);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;};</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classShipCAD_1_1CurveFaceShader.html">  152</a></span>&#160;<span class="keyword">class </span><a class="code" href="classShipCAD_1_1CurveFaceShader.html">CurveFaceShader</a> : <span class="keyword">public</span> <a class="code" href="classShipCAD_1_1Shader.html">Shader</a></div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;{</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    Q_OBJECT</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classShipCAD_1_1CurveFaceShader.html">CurveFaceShader</a>(<a class="code" href="classShipCAD_1_1Viewport.html">Viewport</a>* vp);</div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classShipCAD_1_1CurveFaceShader.html#af99773914de0758627d57aae99b5d44b">  159</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classShipCAD_1_1CurveFaceShader.html#af99773914de0758627d57aae99b5d44b">~CurveFaceShader</a>() {}</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keywordtype">void</span> setMatrices(<span class="keyword">const</span> QMatrix4x4&amp; proj, <span class="keyword">const</span> QMatrix4x4&amp; view, <span class="keyword">const</span> QMatrix4x4&amp; world);</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> renderMesh(QVector&lt;QVector3D&gt;&amp; vertices,</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                            QVector&lt;QVector3D&gt;&amp; colors,</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                            QVector&lt;QVector3D&gt;&amp; normals);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;};</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;}   <span class="comment">// end namespace</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">#endif // SHADER_H</span></div><div class="ttc" id="classShipCAD_1_1Shader_html_a0ee19c28f4fd4260b70095ccd433d546"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a0ee19c28f4fd4260b70095ccd433d546">ShipCAD::Shader::_viewport</a></div><div class="ttdeci">Viewport * _viewport</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00067">shader.h:67</a></div></div>
<div class="ttc" id="classShipCAD_1_1LineShader_html_ae5c2761813aac4839a5b31648e37d343"><div class="ttname"><a href="classShipCAD_1_1LineShader.html#ae5c2761813aac4839a5b31648e37d343">ShipCAD::LineShader::~LineShader</a></div><div class="ttdeci">virtual ~LineShader()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00082">shader.h:82</a></div></div>
<div class="ttc" id="classShipCAD_1_1LightedFaceShader_html_a6ce7e752639fd1c8dd12b721279ac814"><div class="ttname"><a href="classShipCAD_1_1LightedFaceShader.html#a6ce7e752639fd1c8dd12b721279ac814">ShipCAD::LightedFaceShader::~LightedFaceShader</a></div><div class="ttdeci">virtual ~LightedFaceShader()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00140">shader.h:140</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a011fae279e362f548e8c4e4b35b7291e"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a011fae279e362f548e8c4e4b35b7291e">ShipCAD::Shader::initialize</a></div><div class="ttdeci">virtual void initialize(const char *vertexShaderSource, const char *fragmentShaderSource, std::vector&lt; std::string &gt; uniforms, std::vector&lt; std::string &gt; attributes)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00053">shader.cpp:53</a></div></div>
<div class="ttc" id="classShipCAD_1_1CurveFaceShader_html"><div class="ttname"><a href="classShipCAD_1_1CurveFaceShader.html">ShipCAD::CurveFaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00152">shader.h:152</a></div></div>
<div class="ttc" id="classShipCAD_1_1FaceShader_html"><div class="ttname"><a href="classShipCAD_1_1FaceShader.html">ShipCAD::FaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00097">shader.h:97</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_ac8faec958f9d5806510d39be5f512c8e"><div class="ttname"><a href="classShipCAD_1_1Shader.html#ac8faec958f9d5806510d39be5f512c8e">ShipCAD::Shader::addUniform</a></div><div class="ttdeci">void addUniform(const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00070">shader.cpp:70</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a0f41d7628964320846101cf5938a928e"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a0f41d7628964320846101cf5938a928e">ShipCAD::Shader::release</a></div><div class="ttdeci">void release()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00063">shader.h:63</a></div></div>
<div class="ttc" id="classShipCAD_1_1Viewport_html"><div class="ttname"><a href="classShipCAD_1_1Viewport.html">ShipCAD::Viewport</a></div><div class="ttdef"><b>Definition:</b> <a href="viewport_8h_source.html#l00070">viewport.h:70</a></div></div>
<div class="ttc" id="classShipCAD_1_1FaceShader_html_afbd21e69afb094aea484144be9ac1fbd"><div class="ttname"><a href="classShipCAD_1_1FaceShader.html#afbd21e69afb094aea484144be9ac1fbd">ShipCAD::FaceShader::~FaceShader</a></div><div class="ttdeci">virtual ~FaceShader()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00105">shader.h:105</a></div></div>
<div class="ttc" id="classShipCAD_1_1CurveFaceShader_html_af99773914de0758627d57aae99b5d44b"><div class="ttname"><a href="classShipCAD_1_1CurveFaceShader.html#af99773914de0758627d57aae99b5d44b">ShipCAD::CurveFaceShader::~CurveFaceShader</a></div><div class="ttdeci">virtual ~CurveFaceShader()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00159">shader.h:159</a></div></div>
<div class="ttc" id="classShipCAD_1_1LightedFaceShader_html"><div class="ttname"><a href="classShipCAD_1_1LightedFaceShader.html">ShipCAD::LightedFaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00133">shader.h:133</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html"><div class="ttname"><a href="classShipCAD_1_1Shader.html">ShipCAD::Shader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00045">shader.h:45</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a36bc24054e22fb965b04dae9a2b76eb7"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a36bc24054e22fb965b04dae9a2b76eb7">ShipCAD::Shader::Shader</a></div><div class="ttdeci">Shader(Viewport *vp)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00042">shader.cpp:42</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a3967404471db3284a2448c4a39b8c230"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a3967404471db3284a2448c4a39b8c230">ShipCAD::Shader::_program</a></div><div class="ttdeci">QOpenGLShaderProgram * _program</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00068">shader.h:68</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_aff01df87e8a102f270b5b135a295e59d"><div class="ttname"><a href="classShipCAD_1_1Shader.html#aff01df87e8a102f270b5b135a295e59d">ShipCAD::Shader::~Shader</a></div><div class="ttdeci">virtual ~Shader()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00048">shader.cpp:48</a></div></div>
<div class="ttc" id="classShipCAD_1_1LineShader_html"><div class="ttname"><a href="classShipCAD_1_1LineShader.html">ShipCAD::LineShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00075">shader.h:75</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a5c98e4ae6e3403f179a3fcf204b34baf"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a5c98e4ae6e3403f179a3fcf204b34baf">ShipCAD::Shader::_uniforms</a></div><div class="ttdeci">std::map&lt; std::string, GLuint &gt; _uniforms</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00069">shader.h:69</a></div></div>
<div class="ttc" id="classShipCAD_1_1FaceShader_html_a67bd0296f829456035a829b95f1befb7"><div class="ttname"><a href="classShipCAD_1_1FaceShader.html#a67bd0296f829456035a829b95f1befb7">ShipCAD::FaceShader::FaceShader</a></div><div class="ttdeci">FaceShader(Viewport *vp)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00103">shader.h:103</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a00c06ead1e413d5d5ecbced82478f753"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a00c06ead1e413d5d5ecbced82478f753">ShipCAD::Shader::bind</a></div><div class="ttdeci">void bind()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00062">shader.h:62</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_a6a298be357d7860d859aedbe397b81b9"><div class="ttname"><a href="classShipCAD_1_1Shader.html#a6a298be357d7860d859aedbe397b81b9">ShipCAD::Shader::addAttribute</a></div><div class="ttdeci">void addAttribute(const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="shader_8cpp_source.html#l00081">shader.cpp:81</a></div></div>
<div class="ttc" id="classShipCAD_1_1Shader_html_af2f710f7b4d792fea09ddd11ab0cdf25"><div class="ttname"><a href="classShipCAD_1_1Shader.html#af2f710f7b4d792fea09ddd11ab0cdf25">ShipCAD::Shader::_attributes</a></div><div class="ttdeci">std::map&lt; std::string, GLuint &gt; _attributes</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00070">shader.h:70</a></div></div>
<div class="ttc" id="namespaceShipCAD_html"><div class="ttname"><a href="namespaceShipCAD.html">ShipCAD</a></div><div class="ttdef"><b>Definition:</b> <a href="backgroundimage_8h_source.html#l00039">backgroundimage.h:39</a></div></div>
<div class="ttc" id="classShipCAD_1_1MonoFaceShader_html"><div class="ttname"><a href="classShipCAD_1_1MonoFaceShader.html">ShipCAD::MonoFaceShader</a></div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00114">shader.h:114</a></div></div>
<div class="ttc" id="classShipCAD_1_1MonoFaceShader_html_ab1f3cb853a5a2b04f9c4944d9eca30b4"><div class="ttname"><a href="classShipCAD_1_1MonoFaceShader.html#ab1f3cb853a5a2b04f9c4944d9eca30b4">ShipCAD::MonoFaceShader::~MonoFaceShader</a></div><div class="ttdeci">virtual ~MonoFaceShader()</div><div class="ttdef"><b>Definition:</b> <a href="shader_8h_source.html#l00121">shader.h:121</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Feb 25 2018 15:36:00 for ShipCAD by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
